package com.dhp.campus.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dhp.campus.domain.User;
import com.dhp.campus.domain.request.UserRegisterRequest;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
* @author Dhp
* @description 针对表【user(用户)】的数据库操作Service
* @createDate 2024-02-16 14:01:21
*/
public interface UserService extends IService<User> {

    User userLogin(String userAccount, String userPassword, HttpServletRequest request , HttpServletResponse response);


    User getCurrentUser(HttpServletRequest request);

    Integer updateUser(User updatedUser);

    Page<User> getRecommendUsers(int pageNum, int pageSize , HttpServletRequest request);

    Boolean CheckAuthority(HttpServletRequest request);

    Long userRegister(UserRegisterRequest registerRequest , HttpServletRequest request);

    User getSafetyUser(User Unsafeuser);


    Boolean userLogout(HttpServletRequest request);

    List<User> getMatchUsers(Integer num, HttpServletRequest request);

    List<User> searchUserByTags(List<String> tagNameList, String searchText);

    List<User> getFriendsById(User currentUser);

}
